oj_server=./oj_server
compile_server=./compile_server
output=./output

#编译
.PHONY:all
all:
	@cd $(oj_server);\
	make;\
	cd ..;\
	cd $(compile_server);\
	make;\
	cd ..;

#发布
#只需要可执行程序和配置文件和日志以及前端页面和依赖
.PHONY:release
release:
	@mkdir $(output);\
	cp $(oj_server)/oj_server $(output)/;\
	cp $(compile_server)/compile.exe $(output)/;\
	cp -r $(compile_server)/temp $(output)/;\
	cp -r $(oj_server)/web $(output)/;\
	cp -r $(oj_server)/conf $(output)/;\
	cp -r $(oj_server)/log $(output)/;\
	cp -r $(oj_server)/lib $(output)/;\
	cp -r $(oj_server)/question_html $(output)/;

#清理
.PHONY:clean
clean:
	@cd $(oj_server);\
	make clean;\
	cd ..;\
	cd $(compile_server);\
	make clean;\
	cd ..;\
	rm -rf $(output);